import { Collapse } from '../../components';

const { Panel } = Collapse;

const text = `
  Love is just a word until someone comes along and give it a meaning.
`;

export default function CollapseView() {
  const onChange = (key: string | string[]) => {
    console.log(key);
  };

  return (
    <>
      <Collapse defaultActiveKey={['1']} onChange={onChange}>
        <Panel header="This is panel header 1" key="1">
          <p>{text}</p>
        </Panel>
        <Panel header="This is panel header 2" key="2">
          <p>{text}</p>
        </Panel>
        <Panel header="This is panel header 3" key="3">
          <p>{text}</p>
        </Panel>
      </Collapse>
    </>
  );
}
